package com.ronx.scs.validator;

import com.ronx.scs.model.Car;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;

public class CarValidator implements Validator {
    @Override
    public boolean supports(Class<?> aClass) {
        return aClass.equals(Car.class);
    }

    @Override
    public void validate(Object o, Errors errors) {
        Car u = (Car) o;
//         ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "name" , "required");
//         ValidationUtils.rejectIfEmptyOrWhitespace(errors, "email", "email", "required");
    }
}
